home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 140 / Gekkan Dennou Club - 2000.1 Vol. 140 (Japan).7z / Gekkan Dennou Club - 2000.1 Vol. 140 (Japan) (Track 1).bin / tools / xpicw / xpicw110.lzh / WLSource / ziwa.s < prev   
Encoding:
Text File  |  1997-04-10  |  3.6 KB  |  235 lines

  1. *    ziwa.s
  2. *        じわじわ / 最高速 = 3
  3. *            by Mitsuky
  4.  
  5.  
  6. SPEED_MAX    equ    3
  7.  
  8.     .offset    8        * 引き数
  9. _source_ptr:    .ds.l    1
  10. _dest_ptr:    .ds.l    1
  11. _speed:        .ds.l    1
  12. _vdisp:        .ds.l    1
  13.  
  14.  
  15.  
  16. gpos    .macro    pos_x,pos_y
  17.     .dc.w    (pos_y*1024)+(pos_x*2)
  18.     .endm
  19.  
  20.  
  21.     .text
  22.     .even
  23.  
  24.     .dc.b    'WL10',$0d,$0a
  25.     .dc.b    'じわじわ / 最高速 = 3',$0d,$0a
  26.     .dc.b    '    by Mitsuky',$0d,$0a
  27.     .dc.b    $1a
  28.     .even
  29.  
  30. ziwa:
  31.     link    a6,#0
  32.     movem.l    d1-d7/a0-a5,-(sp)
  33.  
  34.     move.l    _speed(a6),d0
  35.     bmi    ziwa_ask_speed
  36.     cmpi.l    #SPEED_MAX,d0
  37.     bhi    ziwa_err
  38.  
  39.     tst.l    _vdisp(a6)
  40.     bmi    ziwa_ask_vdisp
  41.  
  42.  
  43.     moveq.l    #SPEED_MAX,d3
  44.     sub.w    d0,d3    * d3.w = vdisp 待ち回数-1
  45.  
  46.     movea.l    _source_ptr(a6),a2    * a2.l = 転送元アドレス・その1
  47.     movea.l    _dest_ptr(a6),a3    * a3.l = 転送先アドレス・その1
  48.     lea.l    table(pc),a4        * a4.l = テーブル
  49.  
  50.     moveq.l    #64-1,d7    * d7.w = ループ回数-1
  51. ziwa_loop:
  52.     move.w    d3,d0
  53. @@:    bsr    vdisp
  54.     dbra    d0,@b
  55.  
  56.     movea.l    a2,a0
  57.     movea.l    a3,a1
  58.  
  59.     moveq.l    #64-1,d5
  60. ziwa_loop_y2:
  61.     moveq.l    #64/32-1,d4
  62. ziwa_loop_x2:
  63.     move.w    (a0),(a1)
  64.     move.w    16*1(a0),16*1(a1)
  65.     move.w    16*2(a0),16*2(a1)
  66.     move.w    16*3(a0),16*3(a1)
  67.     move.w    16*4(a0),16*4(a1)
  68.     move.w    16*5(a0),16*5(a1)
  69.     move.w    16*6(a0),16*6(a1)
  70.     move.w    16*7(a0),16*7(a1)
  71.     move.w    16*8(a0),16*8(a1)
  72.     move.w    16*9(a0),16*9(a1)
  73.     move.w    16*10(a0),16*10(a1)
  74.     move.w    16*11(a0),16*11(a1)
  75.     move.w    16*12(a0),16*12(a1)
  76.     move.w    16*13(a0),16*13(a1)
  77.     move.w    16*14(a0),16*14(a1)
  78.     move.w    16*15(a0),16*15(a1)
  79.     move.w    16*16(a0),16*16(a1)
  80.     move.w    16*17(a0),16*17(a1)
  81.     move.w    16*18(a0),16*18(a1)
  82.     move.w    16*19(a0),16*19(a1)
  83.     move.w    16*20(a0),16*20(a1)
  84.     move.w    16*21(a0),16*21(a1)
  85.     move.w    16*22(a0),16*22(a1)
  86.     move.w    16*23(a0),16*23(a1)
  87.     move.w    16*24(a0),16*24(a1)
  88.     move.w    16*25(a0),16*25(a1)
  89.     move.w    16*26(a0),16*26(a1)
  90.     move.w    16*27(a0),16*27(a1)
  91.     move.w    16*28(a0),16*28(a1)
  92.     move.w    16*29(a0),16*29(a1)
  93.     move.w    16*30(a0),16*30(a1)
  94.     move.w    16*31(a0),16*31(a1)
  95.     lea.l    16*32(a0),a0
  96.     lea.l    16*32(a1),a1
  97.     dbra    d4,ziwa_loop_x2
  98.  
  99.     lea.l    7*512*2(a0),a0
  100.     lea.l    7*512*2(a1),a1
  101.     dbra    d5,ziwa_loop_y2
  102.  
  103.     adda.w    (a4),a2
  104.     adda.w    (a4)+,a3
  105.     dbra    d7,ziwa_loop
  106.  
  107.     moveq.l    #0,d0
  108. ziwa_rts:
  109.     movem.l    (sp)+,d1-d7/a0-a5
  110.     unlk    a6
  111.     rts
  112.  
  113.  
  114. ****    ****
  115. vdisp:
  116.     movem.l    a0,-(sp)
  117.     move.l    _vdisp(a6),a0
  118.     jsr    (a0)
  119.     movem.l    (sp)+,a0
  120.     rts
  121.  
  122.  
  123. ****    ****
  124. ziwa_err:
  125.     moveq.l    #-1,d0
  126.     bra    ziwa_rts
  127.  
  128.  
  129. ****    ****
  130. ziwa_ask_speed:
  131.     moveq.l    #SPEED_MAX,d0
  132.     bra    ziwa_rts
  133.  
  134.  
  135. ****    ****
  136. ziwa_ask_vdisp:
  137.     move.l    _speed(a6),d0
  138.     lea.l    ask_vdisp_table(pc),a0
  139.     add.w    d0,d0
  140.     move.w    (a0,d0.w),d0
  141.     bra    ziwa_rts
  142.  
  143. ask_vdisp_table:
  144.     .dc.w    256,192,128,64
  145.  
  146.  
  147. *********************************************************
  148. table:
  149.     gpos    4,4
  150.     gpos    -2,2
  151.     gpos    3,-5
  152.     gpos    2,2
  153.     gpos    -5,-1
  154.     gpos    4,4
  155.     gpos    -3,1
  156.     gpos    4,-6
  157.     gpos    -7,3
  158.     gpos    7,3
  159.     gpos    -3,-5
  160.     gpos    -3,3
  161.     gpos    5,-5
  162.     gpos    -3,3
  163.     gpos    2,4
  164.     gpos    1,-5
  165.     gpos    -4,-2
  166.     gpos    1,5
  167.     gpos    3,-1
  168.     gpos    -3,-3
  169.     gpos    4,4
  170.     gpos    -6,-2
  171.     gpos    3,3
  172.     gpos    1,-3
  173.     gpos    -1,-3
  174.     gpos    -4,2
  175.     gpos    1,5
  176.     gpos    4,-2
  177.     gpos    -4,-4
  178.     gpos    -1,5
  179.     gpos    2,-2
  180.  
  181.     gpos    -1,-4
  182.  
  183.     gpos    4,4
  184.     gpos    -2,2
  185.     gpos    3,-5
  186.     gpos    -6,2
  187.     gpos    3,-1
  188.     gpos    4,4
  189.     gpos    -3,1
  190.     gpos    -4,-6
  191.     gpos    1,3
  192.     gpos    -1,3
  193.     gpos    5,-5
  194.     gpos    -3,3
  195.     gpos    5,-5
  196.     gpos    -3,3
  197.     gpos    2,4
  198.     gpos    1,-5
  199.     gpos    -4,-2
  200.     gpos    1,5
  201.     gpos    3,-1
  202.     gpos    -3,-3
  203.     gpos    -4,4
  204.     gpos    2,-2
  205.     gpos    3,3
  206.     gpos    1,-3
  207.     gpos    -1,-3
  208.     gpos    -4,2
  209.     gpos    1,5
  210.     gpos    4,-2
  211.     gpos    -4,-4
  212.     gpos    -1,5
  213.     gpos    2,-2
  214.  
  215.  
  216. *    00..17..25..13..
  217. *    ..29..20..03..08
  218. *    26..05..11..16..
  219. *    ..22..14..24..04
  220. *    09..31..01..19..
  221. *    ..12..18..28..21
  222. *    30..02..23..06..
  223. *    ..27..07..15..10
  224.  
  225. *    ..00..17..25..13
  226. *    08..29..20..03..
  227. *    ..26..05..11..16
  228. *    04..22..14..24..
  229. *    ..09..31..01..19
  230. *    21..12..18..28..
  231. *    ..30..02..23..06
  232. *    10..27..07..15..
  233.  
  234.  
  235.